<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <span v-if='flag'>如果flag为true,我就显示</span>
        <span v-else>如果flag为flase,我就显示</span>
        <button @click='change'>提交转换</button>
    </div>
    <script src="../../vue.js"></script>
    <script>
        new Vue({
            el : '#app',
            data : {
                flag : true
            },
            methods : {
                change(){
                    this.flag = !this.flag
                }
            }
        })
    </script>
</body>
</html>